package com.ming.demo.mapper;

import com.ming.demo.model.InfoPeople;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface InfoPeopleMapper {
    @Insert("insert into infoPeople(`name`, phone, address, description) values(#{infoPeople.name}, #{infoPeople.phone}, #{infoPeople.address}, #{infoPeople.description})")
    public int insertInto(@Param("infoPeople")InfoPeople infoPeople);

    @Select("select * from infoPeople")
    public List<InfoPeople> findAllPeople();
}
